<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主页</title>
</head>
<body>
    {% if request.session and request.session.user %}
    欢迎：{{ request.session.user.username }}
    <a href="/user/logout">退出登陆</a>
    {% else %}
    <a href="/user/login">登陆</a>
    <a href="/user/reg">注册</a>
    {% endif %}

    <div>
    {% if request.session and request.session.user %}
    <a href="/note/">进入我的云笔记</a>
    {% endif %}
    </div>

</body>
</html>